package com.jdyinfo.ic.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jdyinfo.ic.mysql.entity.Account;
import com.jdyinfo.ic.mysql.mapper.AccountMapper;

@Service("accountService")
public class AccountService {
	@Autowired
	AccountMapper accountMapper;
	
	public Account findAccount(String name) {
		return accountMapper.findAccountByName(name);
	}
	
	public int createAccount(Account account) {
		return accountMapper.insertOne(account);
	}
	
	public int changeAccountPassword(Account account) {
		return accountMapper.updateAccountPassword(account);
	}
	
	public int changeAccountStatus(Account account) {
		return accountMapper.updateAccountStatus(account);
	}
	
}
